﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using PSMock.Implementation;

namespace PSMock
{

	/// <summary>
	/// Option for mocking all members.
	/// </summary>
	public class AllMembersOption
	{
		protected MockedInstance mockedInstance;

		/// <summary>
		/// Initializes a new instance of the <see cref="AllMembersOption"/> class.
		/// </summary>
		/// <param name="instance">The instance.</param>
		public AllMembersOption(MockedInstance instance)
		{
			this.mockedInstance = instance;
		}


		///// <summary>
		///// Mock this function or method for all instances.
		///// </summary>
		//public Option ForAllInstances()
		//{
		//  mockedFunction.Instance = null;
		//  return this;
		//}


		/// <summary>
		/// Throws the specified exception when the mocked method of function is called.
		/// </summary>
		public AllMembersOption Throw(Exception exception)
		{
			mockedInstance.ThrowException = exception;
			return this;
		}
	}

}
